package com.example.drainage.ui.media.util;

import java.util.Objects;

public class AudioBean {
    // 总时长
    private int time;
    private String name;
    private String localPath;
    private String netPath;

    // -------播放相关----------------
    // 播放时长
    private int playTime;
    // 是否在播放
    private boolean isPlaying;

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public int getPlayTime() {
        return playTime;
    }

    public void setPlayTime(int playTime) {
        this.playTime = playTime;
    }

    public boolean isPlaying() {
        return isPlaying;
    }

    public void setPlaying(boolean playing) {
        isPlaying = playing;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLocalPath() {
        return localPath;
    }

    public void setLocalPath(String localPath) {
        this.localPath = localPath;
    }

    public String getNetPath() {
        return netPath;
    }

    public void setNetPath(String netPath) {
        this.netPath = netPath;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AudioBean that = (AudioBean) o;
        return Double.compare(that.time, time) == 0 &&
                Double.compare(that.playTime, playTime) == 0 &&
                isPlaying == that.isPlaying &&
                Objects.equals(name, that.name) &&
                Objects.equals(localPath, that.localPath) &&
                Objects.equals(netPath, that.netPath);
    }

    @Override
    public int hashCode() {
        return Objects.hash(time, playTime, isPlaying, name, localPath, netPath);
    }
}